package fons.navigator.views.quadrant;

import java.awt.geom.Point2D;

import edu.umd.cs.piccolo.PNode;
import fons.navigator.util.box2d.DynamicallyPlaceable;

public class Blocker extends PNode implements DynamicallyPlaceable {
	private static final long serialVersionUID = 1L;
	
	private final double radius;

	public Blocker (double radius) {
		this.radius = radius;
	}
	
	@Override
	public Point2D getGlobalOrigin() {
		Point2D pos = this.getParent().getGlobalTranslation();
		pos.setLocation(pos.getX(), pos.getY());
		return pos;
	}

	@Override
	public ShapeType getShapeType() {
		return ShapeType.CIRCLE;
	}

	@Override
	public double getShapeRadius() {
		return radius;
	}

	@Override
	public double getShapeHeight() {
		return radius;
	}

	@Override
	public double getShapeWidth() {
		return radius;
	}

	@Override
	public double getMass() {
		return 5;
	}

	@Override
	public double getAnchorRadius() {
		return 0;
	}

	@Override
	public void placeAt(Point2D globalPoint) {
		//don't care
		/*globalPoint.setLocation(globalPoint.getX()-radius,
				globalPoint.getY()-radius);
		this.setGlobalTranslation(globalPoint);*/
	}

}
